<!--#include file="Config.asp"-->
<!--#include file="emp_is.asp"-->
<!--#include file="Header.asp"-->
<table class="table table-condensed table-hover table-bordered">
  <tr>
    <td ><a href="BBS_Post.asp">发布新贴子</a></td></tr>
      </table>

<table class="table table-condensed table-hover table-bordered">
<%
page=request.querystring("page")
set rs=server.createobject("adodb.recordset")
sql="select id,MemberID,Member,title,addtime,up from BBS order by up desc,id desc"
rs.open sql,conn,1,1
on error resume next
maxjilu=rs.recordcount
perpage=20'每页显示记录数
t=page*perpage
rs.absoluteposition=t+1
f=t+perpage

ww=0
for i=t+1 to f
ww=ww+1
%>
      <tr>
        <td width="100" height="20" align="center"><%=rs("Member")%></td>
        <td><a href="BBSList.asp?id=<%=rs("id")%>"><%=rs("title")%></a></td>
        <td width="150"><%=Format_Time(rs("addtime"),1)%></td>
      </tr>
<%
rs.movenext
if rs.eof then
exit for
rs.close
set rs=nothing
end if
next
tt=page*perpage
    if page<0 then
   page=0
   end if
   if tt>=maxjilu then
   ttt=page-1
   end if
   if maxjilu-tt<perpage then
   ttt=page-1
      else
   ttt=page
   end if
   u=1
   do while u*perpage<maxjilu
   u=u+1
   loop
session("page")=ttt
set conn=nothing
%>
</table>


<table class="table table-condensed table-hover table-bordered">
<tr>
    <td ><a href="?page=0">首页</a>-<a href="?page=<%=(page-1)%>">上页</a>-<a href="?page=<%=(page+1)%>" >下页</a>-<a href="?page=<%=(u-1)%>" >末页</a>
          <%
  if ttt<=5 then
  uu=0
  while uu<u
   %>
          <a href="?page=<%=(uu)%>"><%=(uu+1)%></a>
          <%uu=uu+1
 wend
  else%>
          <a style="color:blue" href="?page=<%=(ttt-6)%>">[<%=(ttt-5)%>]</a> <a style="color:blue" href="?page=<%=(ttt-5)%>">[<%=(ttt-4)%>]</a> <a style="color:blue" href="?page=<%=(ttt-4)%>">[<%=(ttt-3)%>]</a> <a style="color:blue" href="?page=<%=(ttt-3)%>">[<%=(ttt-2)%>]</a> <a style="color:blue" href="?page=<%=(ttt-2)%>">[<%=(ttt-1)%>]</a> <a style="color:blue" href="?page=<%=(ttt-1)%>" >[<%=(ttt)%>]</a> <a style="color:blue" href="?page=<%=(ttt)%>">[<%=(ttt+1)%>]</a>
          <%end if%>
    </td>
  </tr>
</table>

<!--#include file="Footer.asp" -->